package com.vcms.cms.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * CommentExt entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "comment_ext", catalog = "vcms_0.1")
public class CommentExt implements java.io.Serializable {

	// Fields

	private Integer commentExtId;
	private Comment comment;
	private String ip;
	private String text;
	private String reply;

	// Constructors

	/** default constructor */
	public CommentExt() {
	}

	/** full constructor */
	public CommentExt(Comment comment, String ip, String text, String reply) {
		this.comment = comment;
		this.ip = ip;
		this.text = text;
		this.reply = reply;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "commentExtId", unique = true, nullable = false)
	public Integer getCommentExtId() {
		return this.commentExtId;
	}

	public void setCommentExtId(Integer commentExtId) {
		this.commentExtId = commentExtId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "commentId")
	public Comment getComment() {
		return this.comment;
	}

	public void setComment(Comment comment) {
		this.comment = comment;
	}

	@Column(name = "ip", length = 100)
	public String getIp() {
		return this.ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	@Column(name = "text")
	public String getText() {
		return this.text;
	}

	public void setText(String text) {
		this.text = text;
	}

	@Column(name = "reply")
	public String getReply() {
		return this.reply;
	}

	public void setReply(String reply) {
		this.reply = reply;
	}

}